/*
 Navicat Premium Data Transfer

 Source Server         : vue_shop
 Source Server Type    : MySQL
 Source Server Version : 80025
 Source Host           : localhost:3306
 Source Schema         : vue_shop

 Target Server Type    : MySQL
 Target Server Version : 80025
 File Encoding         : 65001

 Date: 22/08/2021 16:36:36
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for menus_info
-- ----------------------------
DROP TABLE IF EXISTS `menus_info`;
CREATE TABLE `menus_info`
(
    `id`             int NOT NULL AUTO_INCREMENT,
    `menu_name`      varchar(255) DEFAULT NULL,
    `parent_menu_id` int          DEFAULT NULL,
    `path`           varchar(255) DEFAULT NULL,
    `icon`           varchar(255) DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `parent_menu_id` (`parent_menu_id`),
    CONSTRAINT `menus_info_ibfk_1` FOREIGN KEY (`parent_menu_id`) REFERENCES `menus_info` (`id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 13
  DEFAULT CHARSET = utf8mb3;

-- ----------------------------
-- Records of menus_info
-- ----------------------------
BEGIN;
INSERT INTO `menus_info`
VALUES (1, '用户管理', NULL, NULL, 'iconfont icon-Customermanagement');
INSERT INTO `menus_info`
VALUES (2, '用户列表', 1, '/users', NULL);
INSERT INTO `menus_info`
VALUES (3, '权限管理', NULL, NULL, 'iconfont icon-product');
INSERT INTO `menus_info`
VALUES (4, '角色列表', 3, '/roles', NULL);
INSERT INTO `menus_info`
VALUES (5, '权限列表', 3, '/auths', NULL);
INSERT INTO `menus_info`
VALUES (6, '商品管理', NULL, NULL, 'iconfont icon-bags');
INSERT INTO `menus_info`
VALUES (7, '商品列表', 6, '/products', NULL);
INSERT INTO `menus_info`
VALUES (8, '分类参数', 6, '/params', NULL);
INSERT INTO `menus_info`
VALUES (9, '商品分类', 6, '/category', NULL);
INSERT INTO `menus_info`
VALUES (10, '订单管理', NULL, NULL, 'iconfont icon-category');
INSERT INTO `menus_info`
VALUES (11, '数据统计', NULL, NULL, 'iconfont icon-tradingdata');
INSERT INTO `menus_info`
VALUES (12, '订单列表', 10, '/orders', NULL);
COMMIT;

-- ----------------------------
-- Table structure for order_info
-- ----------------------------
DROP TABLE IF EXISTS `order_info`;
CREATE TABLE `order_info`
(
    `id`              int NOT NULL AUTO_INCREMENT,
    `user_id`         int                                                     DEFAULT NULL,
    `number`          varchar(255)                                            DEFAULT NULL,
    `price`           varchar(255)                                            DEFAULT NULL,
    `send_status`     tinyint                                                 DEFAULT NULL,
    `trade_no`        varchar(255)                                            DEFAULT NULL,
    `invoice_title`   varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `invoice_content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `address`         varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `create_time`     datetime                                                DEFAULT CURRENT_TIMESTAMP,
    `update_time`     datetime                                                DEFAULT CURRENT_TIMESTAMP,
    `pay_status`      tinyint                                                 DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 4
  DEFAULT CHARSET = utf8mb3;

-- ----------------------------
-- Records of order_info
-- ----------------------------
BEGIN;
INSERT INTO `order_info`
VALUES (1, 1, '123', '50', 1, 'aaaa', NULL, NULL, NULL, '2021-08-21 22:12:34', '2021-08-21 22:12:34', 1);
INSERT INTO `order_info`
VALUES (2, 1, '123', '46', 1, 'bbbb', NULL, NULL, NULL, '2021-08-21 22:34:53', '2021-08-21 22:34:53', 0);
INSERT INTO `order_info`
VALUES (3, 1, '123', '334', 0, 'cccc', NULL, NULL, NULL, '2021-08-21 22:35:16', '2021-08-21 22:35:16', 0);
COMMIT;

-- ----------------------------
-- Table structure for roles_info
-- ----------------------------
DROP TABLE IF EXISTS `roles_info`;
CREATE TABLE `roles_info`
(
    `id`        int                                                     NOT NULL AUTO_INCREMENT,
    `role_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 3
  DEFAULT CHARSET = utf8mb3;

-- ----------------------------
-- Records of roles_info
-- ----------------------------
BEGIN;
INSERT INTO `roles_info`
VALUES (1, 'ROLE_ADMIN');
INSERT INTO `roles_info`
VALUES (2, 'ROLE_USER');
COMMIT;

-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info`
(
    `id`          int          NOT NULL AUTO_INCREMENT,
    `username`    varchar(255) NOT NULL,
    `password`    varchar(255) NOT NULL,
    `mobile`      varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `state`       tinyint                                                 DEFAULT '1',
    `email`       varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `create_time` datetime     NOT NULL                                   DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 21
  DEFAULT CHARSET = utf8mb3;

-- ----------------------------
-- Records of user_info
-- ----------------------------
BEGIN;
INSERT INTO `user_info`
VALUES (1, '徐总', '1234', '13888887777', 1, 'zhuo.c@qq.com', '2021-08-20 10:33:00');
INSERT INTO `user_info`
VALUES (2, '陈总', '1234', '18583488713', 1, 'zhuo.c@qq.com', '2021-08-20 10:33:03');
INSERT INTO `user_info`
VALUES (3, '李四', '1234', '13888888888', 1, 'zhuo.c@qq.com', '2021-08-20 10:33:05');
INSERT INTO `user_info`
VALUES (10, '李四', '1234', '13888888888', 1, 'zhuo.c@qq.com', '2021-08-20 10:33:08');
INSERT INTO `user_info`
VALUES (11, '王五', '1234', '13888888888', 1, 'zhuo.c@qq.com', '2021-08-20 10:33:10');
INSERT INTO `user_info`
VALUES (12, '找钱', '1234', '13888888888', 1, 'zhuo.c@qq.com', '2021-08-20 10:33:12');
INSERT INTO `user_info`
VALUES (13, '李耳', '1234', '13888888888', 1, 'zhuo.c@qq.com', '2021-08-20 10:33:15');
INSERT INTO `user_info`
VALUES (14, '顺子', '1234', '13888888888', 1, 'zhuo.c@qq.com', '2021-08-20 10:33:17');
INSERT INTO `user_info`
VALUES (15, '猴哥', '1234', '13888888888', 1, 'zhuo.c@qq.com', '2021-08-20 10:33:19');
INSERT INTO `user_info`
VALUES (19, '王者荣耀', '1234', '13111111111', 1, 'wwww@qq.com', '2021-08-20 21:31:08');
INSERT INTO `user_info`
VALUES (20, '测试用户', '1234', '18583488713', 1, '123@qq.com', '2021-08-21 10:26:06');
COMMIT;

-- ----------------------------
-- Table structure for user_roles
-- ----------------------------
DROP TABLE IF EXISTS `user_roles`;
CREATE TABLE `user_roles`
(
    `id`      int NOT NULL AUTO_INCREMENT,
    `user_id` int NOT NULL,
    `role_id` int NOT NULL,
    PRIMARY KEY (`id`),
    KEY `user_id` (`user_id`),
    KEY `role_id` (`role_id`),
    CONSTRAINT `user_roles_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user_info` (`id`),
    CONSTRAINT `user_roles_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `roles_info` (`id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 5
  DEFAULT CHARSET = utf8mb3;

-- ----------------------------
-- Records of user_roles
-- ----------------------------
BEGIN;
INSERT INTO `user_roles`
VALUES (4, 2, 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
